Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
1 similar comment
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
20af652 to
b3e8272
Compare
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
b3e8272 to
5553207
Compare
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
e7d2e21 to
b6e1b03
Compare
642b5da to
ecabfc2
Compare
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
Pull request overview
This pull request implements checkout localization features for the Polar platform, cherry-picking work from PRs #9088 and #8755. It adds internationalization support to enable translated checkout experiences in multiple languages (Dutch, Spanish, French, Swedish, German, and Hungarian).
Changes:
- Adds new i18n package with translation infrastructure and locale files
- Implements locale detection and resolution from browser, API, and query parameters
- Updates checkout components to support locale-aware rendering
- Adds feature flag for organizations to enable checkout localization
- Includes documentation and CI/CD workflow for translation management
Reviewed changes
Copilot reviewed 65 out of 66 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| server/polar/organization/schemas.py | Added checkout_localization_enabled feature flag |
| server/polar/checkout/service.py | Implements locale propagation from customer to checkout with feature flag check |
| clients/packages/i18n/* | New i18n package with translations, utilities, and scripts |
| clients/packages/checkout/src/* | Updated components to accept and use locale props |
| clients/apps/web/src/utils/i18n/* | Locale resolution utilities for Next.js app |
| clients/apps/web/src/components/* | Component updates to propagate locale throughout app |
| docs/features/checkout/localization.mdx | Documentation for the localization feature |
| .github/workflows/i18n_translate.yml | CI workflow for automated translation generation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const ordinal = (number: number, locale: AcceptedLocale = 'en'): string => { | ||
| const rules = new Intl.PluralRules(locale, { type: 'ordinal' }) | ||
| const category = rules.select(number) | ||
|
|
||
| if (getTranslationLocale(locale) === 'nl') { | ||
| return `${number}e` | ||
| } | ||
|
|
||
| const ordinal = (number: number): string => { | ||
| const category = ordinalRules.select(number) | ||
| const suffix = suffixes[category] | ||
| return number + suffix | ||
| const suffix = enSuffixes[category] ?? '' | ||
| return `${number}${suffix}` | ||
| } |
There was a problem hiding this comment.
The ordinal function only handles Dutch ('nl') as a special case. Other languages like French, Spanish, German, Swedish, and Hungarian may also require different ordinal formatting rules. Consider either handling all supported languages or documenting that only English and Dutch ordinals are currently supported.
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Cherry-picking from #9088 and #8755